#define _CRT_SECURE_NO_WARNINGS 1

#include"BinaryTree.h"

void treelink()
{
	BTNode* n1 = BuyBTNode(1);
	BTNode* n2 = BuyBTNode(2);
	BTNode* n3 = BuyBTNode(3);
	BTNode* n4 = BuyBTNode(4);
	BTNode* n5 = BuyBTNode(5);
	BTNode* n6 = BuyBTNode(6);
	BTNode* root = n1;
	root->left = n2;
	root->right = n4;
	n4->left = n5;
	n4->right = n6;
	n2->left = n3;

	printf("%d\n", BinaryTreeSize(root));
	printf("%d\n", BinaryTreeLeafSize(root));
	printf("%d\n", BinaryTreeLevelKSize(root, 3));
	printf("%p\n", BinaryTreeFind(root, 4));
	BinaryTreePrevOrder(root);
	printf("\n");
	BinaryTreeInOrder(root);
	printf("\n");
	BinaryTreePostOrder(root);
	printf("\n");

	/*BinaryTreeLevelOrder(root);*/
	printf("%d ",BinaryTreeComplete(root));
	BinaryTreeDestory(&root);
}

int main()
{
	treelink();

	return 0;
}
